<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.turing.post.webservice.client.MerchantOper"%>
<%@page import="com.turing.selfwebservice.common.Toolkit"%>
<%@page import="com.turing.selfwebservice.util.DateUtil"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
		<script type="text/javascript">var basePath="<%=basePath%>";</script>

		<title>商户操作员信息</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="<%=path %>/css/c.css" rel="stylesheet" type="text/css" />
		<link href="<%=path %>/js/plugs/fancybox/jquery.fancybox-1.3.4.css"
			rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=path %>/js/jquery.js">
</script>
		<script type="text/javascript"
			src="<%=path %>/js/plugs/fancybox/jquery.fancybox-1.3.4.pack.js">
</script>
		<script type="text/javascript" src="<%=path %>/js/common.js">
</script>

		<script type="text/javascript" src="<%=path %>/cardholderuser/cardholderuser.js">
</script>
		<script type="text/javascript" src="<%=path %>/js/plugs/Validform_v5.3_min.js">
</script>
	<script>
	$(document).ready(function(){
		$("#UpdateMerchatnOperForm,#UpdateMerchanrPwdForm").Validform({tiptype:validFormConfig.tiptype_img});
	});
	
	</script>
	</head>
	<%
		MerchantOper merchantOper = (MerchantOper) request
				.getAttribute("MerchantOper");
	%>

	<%
		String mrchlogonname = "";
		MerchantOper merchantoper = (MerchantOper) session
				.getAttribute("MerchantOper");
		if (merchantoper != null) {
			mrchlogonname = merchantoper.getMrchOperLogonName();

		}
	%>


	<%
		Object obj = request.getAttribute("UpdateMsg");
		String UpdateMsg = obj == null ? "" : obj.toString();
		if (null != UpdateMsg && !"".equals(UpdateMsg)) {
	%>
	<script type="text/javascript">
alert("<%=UpdateMsg%>");</script>


	<%
		}
	%>
	<body>
		<div align="right" class="optionDiv">
			<a fancyTo="updateMerchantOperDiv" fancyOptions="width:450px;">修改操作员信息</a>
			<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
			<a fancyTo="updateMerchantPwdDiv" fancyOptions="width:400px;">修改操作员密码</a>
			<span>&nbsp;&nbsp;</span>
		</div>
		<table width="95%" border="1" align="center" cellpadding="0"
			cellspacing="0">
			<tr>
				<td colspan="4">
					商户操作员基本信息
				</td>
			</tr>
			<tr>
				<td width="20%">
					登录名：
				</td>
				<td width="30%">
					<%=merchantOper.getMrchOperLogonName()%>
				</td>
				<td width="20%">
					姓名：
				</td>
				<td width="30%">
					<%=merchantOper.getMrchOperName()%>
				</td>
			</tr>
			<tr>
				<td>
					商户号：
				</td>
				<td>
					<%=merchantOper.getMerchantNo()%>
				</td>
				<td>
					商户名：
				</td>
				<td>
					<%=request.getAttribute("merchantName").toString()%>
				</td>
			</tr>
			<tr>
				<td>
					性别：
				</td>
				<td>
					<%="1".equals(merchantOper.getSex()) ? "男" : "0"
					.equals(merchantOper.getSex()) ? "女" : "保密"%>
				</td>
				<td>
					联系电话：
				</td>
				<td>
					<%=Toolkit.dealNull(merchantOper.getLinkTele())%>
				</td>
			</tr>
			<tr>
				<td colspan="4">
					商户操作员详细信息
				</td>
			</tr>
			<tr>
				<td>
					邮箱：
				</td>
				<td>
					<%=Toolkit.dealNull(merchantOper.getEmail())%>
				</td>
				<td>
					上次修改密码时间：
				</td>
				<td>
					<%=DateUtil.getStringByXMLGregorianCalendar(merchantOper
					.getLastPwdChangeTime())%>
				</td>
			</tr>
			<tr>
				<td>
					备注：
				</td>
				<td colspan="3">
					<%=Toolkit.dealNull(merchantOper.getRemark())%>
				</td>
			</tr>
		</table>
		<div id="updateMerchantOperDiv">
			<form method="post" id="UpdateMerchatnOperForm"
				action="<%=basePath%>merchantOperServlet.do?method=UpdateMerchantOperInfo">
				<table width="95%" border="1" align="center" cellpadding="0"
					cellspacing="0">
					<td colspan="2" width="30%">
						<img src="<%=path%>/images/sign.png" />
						&nbsp;修改操作员信息
					</td>

					<tr>
						<td width="30%">
							姓名：
						</td>
						<td width="70%">
							<input type="text" name="mrchOperName" id="mrchOperName"
								datatype="*" errormsg="姓名不能为空!"
								value="<%=merchantOper.getMrchOperName()%>" />
						</td>
					</tr>
					<tr>
						<td>
							性别：
						</td>
						<td>
							<input id="man" name="sex" type="radio" value="1"
								<%="1".equals(merchantOper.getSex()) ? "checked" : ""%> />
							<label for="man">
								男
							</label>
							<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<input id="woman" name="sex" type="radio" value="0"
								<%="0".equals(merchantOper.getSex()) ? "checked" : ""%> />
							<label for="woman">
								女
							</label>
						</td>
					</tr>
					<tr>
						<td>
							联系电话：
						</td>
						<td>
							<input type="text" name="linkTele" id="linkTele" datatype="m"
								errormsg="请输入手机号码!"
								value="<%=Toolkit.dealNull(merchantOper.getLinkTele())%>" />
						</td>
					</tr>
					<tr>
						<td>
							邮箱：
						</td>
						<td>
							<input type="text" name="email" id="email" datatype="e"
								errormsg="请输入正确的邮箱格式!"
								value="<%=Toolkit.dealNull(merchantOper.getEmail())%>" />
						</td>
					</tr>
					<tr>
						<td>
							安全问题1：
						</td>
						<td>
							<input type="text" name="question1" id="question1" datatype="*"
								errormsg="请填写安全问题!" ignore="ignore"
								value="<%=Toolkit.dealNull(merchantOper.getQuestion1())%>" />
						</td>
					</tr>
					<tr>
						<td>
							安全问题答案1：
						</td>
						<td>
							<input type="text" name="answer1" id="answer1" datatype="*"
								errormsg="请填写问题答案!" ignore="ignore"
								value="<%=Toolkit.dealNull(merchantOper.getAnswer1())%>" />
						</td>
					</tr>
					<tr>
						<td>
							安全问题2：
						</td>
						<td>
							<input type="text" name="question2" id="question2" datatype="*"
								errormsg="请填写安全问题!" ignore="ignore"
								value="<%=Toolkit.dealNull(merchantOper.getQuestion2())%>" />
						</td>
					</tr>
					<tr>
						<td>
							安全问题答案2：
						</td>
						<td>
							<input type="text" name="answer2" id="answer2" datatype="*"
								errormsg="请填写问题答案!" ignore="ignore"
								value="<%=Toolkit.dealNull(merchantOper.getAnswer2())%>" />
						</td>
					</tr>
					<tr>
						<td>
							安全问题3：
						</td>
						<td>
							<input type="text" name="question3" id="question3" datatype="*"
								errormsg="请填写安全问题!" ignore="ignore"
								value="<%=Toolkit.dealNull(merchantOper.getQuestion3())%>" />
						</td>
					</tr>
					<tr>
						<td>
							安全问题答案3：
						</td>
						<td>
							<input type="text" name="answer3" id="answer3" datatype="*"
								errormsg="请填写问题答案!" ignore="ignore"
								value="<%=Toolkit.dealNull(merchantOper.getAnswer3())%>" />
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<input type="submit" name="button" id="button" value="提交" />
						</td>
					</tr>
				</table>
			</form>
		</div>

		<div id="updateMerchantPwdDiv">
			<form method="post" id="UpdateMerchanrPwdForm"
				action="<%=basePath%>merchantOperServlet.do?method=UpdateMerchantUserPwd">
				<table width="95%" border="1" align="center" cellpadding="0"
					cellspacing="0">
					<tr>
						<td colspan="2" width="30%">
							<img src="<%=path%>/images/sign.png" />
							&nbsp;修改用户密码
						</td>
					</tr>

					<tr>
						<td width="25%" nowrap class="labelTd">
							用户名：
						</td>
						<td width="75%" class="formTd" id=secTable>
							<input type="text" name="logonName" id="logonName"
								value="<%=mrchlogonname%>" readonly style="border: 0px" />
						</td>
					</tr>
					<tr>
						<td class="labelTd">
							旧密码:
						</td>
						<td class="formTd" id=secTable>
							<input type="password" name="meroldpassword" id="meroldpassword"
								datatype="*" errormsg="密码不能为空!" />
						</td>
					</tr>
					<tr>
						<td class="labelTd">
							新密码:
						</td>
						<td class="formTd" id=secTable>
							<input type="password" name="mernewpassword" id="mernewpassword"
								datatype="s6-30" errormsg="密码长度不够!" />
						</td>
					</tr>
					<tr>
						<td class="labelTd">
							确认密码:
						</td>
						<td class="formTd" id=secTable>
							<input type="password" name="merqrpassword" id="merqrpassword"
								datatype="*" recheck="mernewpassword" nullmsg="请再输入一次密码!"
								errormsg="两次输入的密码不一致!" />
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<input type="submit" name="button" id="button" value="修改" />
						</td>
					</tr>
				</table>
			</form>
		</div>



	</body>
</html>
